Imports Microsoft.Msagl.Drawing
Imports QuickGraph

Namespace Aricie.DNN.Caching.Analysis.Graphs
    Public Class MsaglLayoutCommand(Of V, E As IEdge(Of V))


        Public Sub New()

        End Sub


        Public Sub MsaglVertexNodeEventHandler(ByVal sender As Object, ByVal args As QuickGraph.Msagl.MsaglVertexEventArgs(Of V))
            Me.PrepareNode(args.Vertex, args.Node)

        End Sub

        Public Sub MsaglEdgeNodeEventHandler(ByVal sender As Object, ByVal args As QuickGraph.Msagl.MsaglEdgeEventArgs(Of V, E))
            Me.PrepareEdge(args.Edge, args.GEdge)

        End Sub

        Public Overridable Sub PrepareNode(ByVal vertex As V, ByRef objNode As Node)
            objNode.LabelText = vertex.ToString
        End Sub

        Public Overridable Sub PrepareEdge(ByVal edge As E, ByRef objEdge As Microsoft.Msagl.Drawing.Edge)
            objEdge.Attr.ArrowheadLength = 10
        End Sub

    End Class
End Namespace